﻿@using Moonglade.Core
@model IReadOnlyList<Moonglade.Model.Menu>

@if (Model.Count > 0)
{
    foreach (var menuModel in Model.OrderBy(m => m.DisplayOrder))
    {
        <li id="menu-li-@menuModel.Id" class="nav-item">
            <a id="menu-a-@menuModel.Id"
               href="@MenuService.SterilizeMenuLink(menuModel.Url)"
               class="nav-link"
               target="@(menuModel.IsOpenInNewTab ? "_blank" : null)">
                <span class="@menuModel.Icon"></span>
                <strong>@menuModel.Title</strong>
            </a>
        </li>
    }
}